@echo off
::获取管理员权限
%1 start "" mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c ""%~s0"" ::","","runas",1)(window.close)&&exit

title CHANGE WLAN IP ADDRESS
color f2
mode con lines=32 cols=64
:Prompt
cls
echo  ++++++++++++++++++++++++++++++
echo  +++   [1]Static address    +++
echo  +++   [2]Dhcp address      +++    
echo  +++   [0]Exit              +++
echo  ++++++++++++++++++++++++++++++


set /P select="Input the task No:"
if %select%==1 goto StaticIp
if %select%==2 goto DhcpIp
if %select%==0 goto ExitSct

:StaticIp
::修改静态地址
netsh interface ip set address "network" static 192.168.36.207 255.255.255.0 192.168.36.1
netsh interface ip set dns "network"  static 192.168.10.10 primary

goto Prompt

:DhcpIp
::修改动态地址
netsh interface ip set address "network" dhcp
netsh interface ip set dns "network" dhcp
goto Prompt
:ExitSct
exit